//
//  Bundle + Extension.swift
//  HomeSchoolDemo
//
//  Created by rimi on 16/9/27.
//  Copyright © 2016年 赖虹宇. All rights reserved.
//

import Foundation

extension Bundle {
    //延展只能添加计算型属性
    var bundleName : String? {
        guard let infoPath = Bundle.main.path(forResource: "Info.plist", ofType: nil) else{
            return nil
        }
        return NSDictionary(contentsOfFile: infoPath)?["CFBundleName"] as? String
    }
}
